<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		手机号码: <input type="number" name="" id="" value="" /> <button type="button">发送</button>
		<script type="text/javascript">
			var btn = document.querySelector("button");
			btn.addEventListener("click", function() {
				btn.disabled = true;
				var countDown = 3;
				btn.innerHTML = "已发送(" + (countDown) + ")";
				var timer = setInterval(function() {
					countDown--;
					btn.innerHTML = "已发送(" + countDown + ")";
					if (countDown == 0) {
						btn.disabled = false;
						btn.innerHTML = "发送";
						clearInterval(timer);
					}
				}, 1000);
			})
		</script>
	</body>
</html>
